<?php

	class cmd_messenger extends mdl_messenger
	{
		function sendToFriend($sender,$type,$data,$member_id=null)
		{
			//error_log(print_r(func_get_args(),true),3,__FILE__.'.'.date('Y-m-d H-i-s').'.actionSend.log');	//alone
			$level = $type['level'];
			$desc = $type['label'];

			$tpl = 'send-friend';
			$tmpl_name = 'messenger:'.$sender.'/'.$type;
			$contractInfo = $data;
			if($sender && ($target = $this->_target($sender,$contractInfo,$member_id)))
			{
				//直接发送
				$this->_send($sender,$tmpl_name,$target,$data,$type,$title);
			}
		}
	}
?>